package com.bsj.pay.config;

import com.bsj.pay.model.ConfigBean;

public class GlobalConfig {
	public static boolean isInit=false;
	public static String sitename="";
	public static String proxy_url="";
	public static int operator=1;
	public static int pay_time_out=60;
	public static int query_time_out=300;
	public static int max_arrears_amount=10000;
	public static int order_account_type=1;
	public static int notify_type=1;
	
	public static void setValue(ConfigBean config)
	{
		if("sitename".equals(config.getKey()))GlobalConfig.sitename=config.getValue();
		else if("proxy_url".equals(config.getKey()))GlobalConfig.proxy_url=config.getValue();
		else if("operator".equals(config.getKey()))GlobalConfig.operator=Integer.parseInt(config.getValue());
		else if("pay_time_out".equals(config.getKey()))GlobalConfig.pay_time_out=Integer.parseInt(config.getValue());
		else if("query_time_out".equals(config.getKey()))GlobalConfig.query_time_out=Integer.parseInt(config.getValue());
		else if("max_arrears_amount".equals(config.getKey()))GlobalConfig.max_arrears_amount=Integer.parseInt(config.getValue());
		else if("notify_type".equals(config.getKey()))GlobalConfig.notify_type=Integer.parseInt(config.getValue());
		else if("order_account_type".equals(config.getKey()))GlobalConfig.order_account_type=Integer.parseInt(config.getValue());
	}
}
